package com.example.user.controller;

import com.example.user.model.request.UserRequest;
import com.example.user.model.response.UserResponse;
import com.example.user.service.UserService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@AllArgsConstructor
@RequestMapping("/users")
public class UserController {
    private UserService userService;

    @GetMapping
    public String test() {
        return "dsafafa";
    }

    @PostMapping("/regist")
    public UserResponse regist(@RequestBody UserRequest request) {
        return null;
    }

    @GetMapping("/{id}")
    public UserResponse findUserById(@PathVariable(value = "id") Long id){
        return userService.findById(id);
    }
}
